﻿using System.Windows;
using System.Windows.Input;

namespace MDCAdminTool.Commands
{
    public class RestartCacheCluster : AsyncCommandBindingBase
    {
        public RestartCacheCluster() : base()
        {
            Command = Application.Current.Resources["RestartCacheCluster"] as ICommand;
        }

        protected override void OnExecuted( object sender , ExecutedRoutedEventArgs e )
        {
            var service = e.Parameter as ICacheCommand;
            if ( service != null ) service.Restart();
        }
    }
}